VT-d: correct dma_msi_set_affinity()
authorJan Beulich <jbeulich@suse.com>
Wed, 18 Jan 2017 08:48:57 +0000 (09:48 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 18 Jan 2017 08:48:57 +0000 (09:48 +0100)
commit080a31b6f95e17e3624b8f716653a6e9009912d6
tree4cc64827e3422d36c82dee9b05829a48491e1f1d
parent1febe8da7709dbb30e0818b2f523ebc2c57e27b9
VT-d: correct dma_msi_set_affinity()

Commit 83cd2038fe ("VT-d: use msi_compose_msg()) together with
15aa6c6748 ("amd iommu: use base platform MSI implementation"),
introducing the use of a per-CPU scratch CPU mask, went too far:
dma_msi_set_affinity() may, at least in theory, be called in
interrupt context, and hence the use of that scratch variable is not
correct.

Since the function overwrites the destination information anyway,
allow msi_compose_msg() to be called with a NULL CPU mask, avoiding
the use of that scratch variable.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 7f885a1f49a75c770360b030666a5c1545156e5c
master date: 2016-12-16 14:33:43 +0100
xen/arch/x86/msi.c
xen/drivers/passthrough/vtd/iommu.c